Skip to content

fix(redis): 修复普通用户申请权限后无法查询的问题 - #3250

Open
xueanguo wants to merge 1 commit into
hhyo:masterfrom
xueanguo:codex/fix-redis-query-privilege
Open

fix(redis): 修复普通用户申请权限后无法查询的问题#3250
xueanguo wants to merge 1 commit into
hhyo:masterfrom
xueanguo:codex/fix-redis-query-privilege

Conversation

@xueanguo

Copy link
Copy Markdown
Contributor

No description provided.

@request-info

request-info Bot commented Aug 24, 2026

Copy link
Copy Markdown

你好!感谢你反馈的问题/bug,但是你的描述好像是空的,我们需要你完整的信息,这样才能帮你解决问题 如果不知道怎么写,在新建issue的时候有若干个模板可供选择,祝好!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d03d15478

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +393 to +396
var value = (typeof item === "object" && item !== null)
? item.value : item;
var text = (typeof item === "object" && item !== null)
? item.text : item;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve array-valued database entries

When the selected instance uses Memcached, /api/v1/sqlquery/resources/ returns each node as a one-element array because MemcachedEngine.get_all_databases() appends [db_name] in sql/engines/memcached.py:69-70. Arrays also satisfy this new object check, so both item.value and item.text become undefined; the permission form consequently displays and submits undefined rather than Node - 0, and approved users cannot connect to the requested node. Restrict this branch to objects that actually provide the Redis value/text fields, or retain the prior handling for arrays.

Useful? React with 👍 / 👎.

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.34%. Comparing base (94df327) to head (1d03d15).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3250   +/-   ##
=======================================
  Coverage   88.34%   88.34%           
=======================================
  Files         157      157           
  Lines       29175    29175           
=======================================
  Hits        25775    25775           
  Misses       3400     3400           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xueanguo

Copy link
Copy Markdown
Contributor Author

修复普通用户申请权限后无法查询的问题

@LeoQuote LeoQuote left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对于数据格式不兼容的问题, 请更改 redis engine 使其产出符合标准的数据

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants